<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>js_15</title>
		<script type="text/javascript">
			/**
			 * 测试innerHTML属性
			 */
			window.onload = function() {
				var cityNode = document.getElementById("city");
				alert(cityNode.innerHTML);

				var gameNode = document.getElementById("game");
				var tempNode = cityNode.innerHTML;
				cityNode.innerHTML = gameNode.innerHTML;
				gameNode.innerHTML = tempNode;

			}
		</script>
	</head>

	<body>
		<p>你喜欢哪个城市？</p>
		<ul id="city">
			<li id="bj" name="BeiJing">北京</li>
			<li>上海</li>
			<li>东京</li>
			<li>首尔</li>
		</ul>
		<br/><br/>
		<p>你喜欢哪款单机游戏</p>
		<ul id="game">
			<li id="rl">红警</li>
			<li>实况</li>
			<li>极品飞车</li>
			<li>魔兽</li>
		</ul>
		<br /><br /> gender:
		<input type="radio" name="gender" id="gender" value="male" />Male
		<input type="radio" name="gender" id="gender" value="female" />Female

		<br/><br/> name:
		<input type="text" name="username" id="name" value="idea" />
	</body>

</html>